<?php
/**
 * Created by PhpStorm.
 * User: 我想有个家
 * Date: 2020/4/14
 * Time: 12:29
 */

namespace App\Validate;


class UserValidate extends Validate {

    public function login() {
        return [
            't' => 'string|nullable',
            'auth' => 'string|nullable',
            'mobile' => 'string|nullable|mobile',
            'pwd' => 'string|nullable|min:6|max:20',
        ];
    }

    public function refresh() {
        return [
            'refresh_token' => 'required|string',
        ];
    }


    public function reg() {
        return [
            'mobile' => 'required|string|mobile',
            'sms_code' => 'required|string|min:4|max:4',
            'pwd' => 'required|string|min:6|max:20',
        ];
    }

    public function bind() {
        return [
            'mobile' => 'required|string|mobile',
            'sms_code' => 'required|string|min:4|max:4',
            'reg' => 'required|string',
        ];
    }

    public function changeInfo() {
        return [
            'mobile' => 'string|nullable|mobile',
            'sms_code' => 'string|nullable|min:4|max:4',
            'nick_name' => 'string|nullable|min:1|max:20',
            'headimg' => 'string|nullable|min:18|max:80',
        ];
    }
}
